﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Text;
using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface;

namespace OpenAuth.App
{
    public class CYYGH005App : ApiBaseApp<CYYGH005>
    {
        public CYYGH005App(IApiRepository<CYYGH005> repository) : base(repository)
        {

        }
        /// <summary>
        /// 预约出诊医生查询
        /// </summary>
        /// <param name="ksdm">科室代码</param>
        /// <param name="ksrq">开始日期</param>
        /// <param name="jsrq">结束日期</param>
        /// <returns></returns>
        public IEnumerable<CYYGH005> QueryCYYGH005ByKsdm(string ksdm, string ksrq, string jsrq)
        {
            List<SqlParameter> param = new List<SqlParameter>();
            param.Add(new SqlParameter("@Ksdm", ksdm));
            param.Add(new SqlParameter("@Ksrq", ksrq));
            param.Add(new SqlParameter("@Jsrq", jsrq));
            param.Add(new SqlParameter("@Czyh", "hf001"));
            var result = Query<CYYGH005>("exec usp_web_webtrans_CYYGH005 @ksdm=@Ksdm,@ksrq=@Ksrq,@jsrq=@Jsrq,@czyh=@Czyh", param);
            return result;
        }
    }
}
